package com.daohang361.imqq.protocol;

/**
 * <pre>
 * 定义一些QQ用到的常量，常量的命名方式经过调整，统一为
 * QQ_[类别]_[名称]
 * 
 * 比如表示长度的常量，为QQ_LENGTH_XXXXX
 * 表示最大值的常量，为QQ_MAX_XXXX
 * </pre>
 * 
 * @author naner
 */
public interface QQ {
	/** 空字符串 */
    public static final String EMPTY_STRING = "";
   
    /**QQ版本 */
    public static final int QQ_PROTOCOL_VERSION = 0x2107;
    
    /** 包头  */
    public static final int QQ_PROTOCOL_PACKAGE_HEAD = 0x02;
    
    /** 包尾 */
    public static final int QQ_PROTOCOL_PACKAGE_TAIL = 0x03;
    
    /** 登陆次数 ,2011为6步*/
    public static final int QQ_LOGIN_TIME_PACKET = 6;
    
    /** 登陆协议1 */
    public static final int QQ_PROTOCOL_LOGIN_1=0x91;
    
    /** 登陆协议2 */
    public static final int QQ_PROTOCOL_LOGIN_2=0xBA;
    
    /** 登陆协议3 */
    public static final int QQ_PROTOCOL_LOGIN_3=0xDD;
    
    /** 登陆协议4 */
    public static final int QQ_PROTOCOL_LOGIN_4=0xE5;
    
    /** 登陆协议5 */
    public static final int QQ_PROTOCOL_LOGIN_5=0xE3;
    
    /** 登陆协议6 */
    public static final int QQ_PROTOCOL_LOGIN_6=0x30;

    /** QQ登录包, 第一段12字节固定内容
     *0x02,0x00,0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x64,0x58 
     */  
    public static final byte[] QQ_LOGIN_FIX_91_12 = new byte[] {
    	0x02,0x00,0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x64,0x58
    };
    
    /** QQ登录包, 第一段39字节固定内容 */
    public static final byte[] QQ_LOGIN_FIX_91_39 = new byte[] {
    	0x00,0x01
    };
    
    /** QQ登录包, 第一段41字节固定内容 */
    public static final byte[] QQ_LOGIN_FIX_91_data1 = new byte[] {
    	0x00,0x00,0x08,0x04,0x01,(byte)0xE0
    };
    /** QQ登录包, 第一段47字节固定内容 */
    public static final byte[] QQ_LOGIN_FIX_91_data2 = new byte[] {
    	0x00 ,0x00, 0x03, 0x50, 0x00 ,0x00, 0x00 ,0x01, 0x00 ,0x00 ,0x0C, (byte)0xEB
    };
    
    /** QQ登录包, 第一段59字节固定内容 */
    public static final byte[] QQ_LOGIN_FIX_91_59 = new byte[] {
    	0x00 ,0x00 ,0x00, 0x00 ,0x00 ,0x00, 0x00 ,0x00, 0x00 ,0x00 ,0x00, 0x00, 0x00 ,0x00, 0x00 
    };
    //
    /**QQ登陆接收包，第一段接收token_data */
    public static final byte[] QQ_LOGIN_FIX_91_token=null;
    
    
    /** QQ登录包, 第二段最后段固定内容 */
    public static final byte[] QQ_LOGIN_FIX_BA_tail =new byte[]{
    	0x03 ,0x00 ,0x05 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    };
    
    /**
     * 请求验证码图片的后一个包
     */
    public static final byte[] QQ_LOGIN_FIX_BA_REQUEST_PARTY_IMG=new byte[]{
    	0x03,0x00,0x05,0x00,0x00,0x00,0x00,0x01 
    };
    /**
     * 发送带有验证码的请求
     */
    public static final byte[] QQ_LOGIN_FIX_BA_REQUEST_CHECK_IMG=new byte[]{
    	0x04 ,0x00, 0x05 ,0x00 ,0x00 ,0x00 ,0x00
    };
    /**QQ登陆接收包，第二段接收token_data */
    public static final byte[] QQ_LOGIN_FIX_BA_token=null;
    
    
    /** QQ登录包, 第三段43字节固定内容 */
    public final byte[] QQ_LOGIN_FIX_DD_43 = new byte[] {
    		0x00 ,(byte) 0xDE ,0x00 ,0x01,
    };
    /** QQ登录包, 第三段13字节00固定内容 */
    public final byte[] QQ_LOGIN_FIX_DD_00_L13 = new byte[] {
    		//00 ,00 ,00, 00 ,00, 00, 00 ,00 ,00 ,00 ,00 ,00, 00
    		01, 0x4D, (byte) 0xAE, (byte) 0xCB, 0x39, 00, 00, 00, 01, 00, 00, 00, 00 
    };
    /** QQ登录包, 第三段8字节00固定内容 */
    public final byte[] QQ_LOGIN_FIX_DD_00_L8 = new byte[] {
    		00 ,00 ,00, 00 ,00, 00, 00 ,00 
    };
 
    /** QQ登录包, 第三段30字节近视固定内容 */
    public final byte[] QQ_LOGIN_FIX_DD_L30 = new byte[] {
		/**  (byte)0x6D,(byte)0xC4,(byte)0xA5,(byte)0x52,(byte)0x8F ,(byte)0x73 ,(byte)0x9D ,(byte)0xDF ,
		  (byte)0xA2 ,(byte)0x9E ,(byte)0x0B ,(byte)0xD5 ,(byte)0x1E ,(byte)0x6E ,(byte)0xE9 ,(byte)0xA9 ,
		  (byte)0x84 ,(byte)0x20 ,(byte)0xDE ,(byte)0x55,(byte)0x01 ,(byte)0x77 ,(byte)0x2E ,(byte)0x01 
		  ,(byte)0x22 ,(byte)0x1C ,(byte)0x3A ,(byte)0x9A  ,(byte)0x00 ,(byte)0x10*/
		  
		  
    		(byte)0x46, (byte)0xAE, (byte)0x77, (byte)0xDC, (byte)0x3D, (byte)0x07 ,
    		(byte)0x82, (byte)0xF8, (byte)0x24, (byte)0x54, (byte)0x43, (byte)0xEF, (byte)0x48,
    		(byte)0x40, (byte)0x2D, (byte)0xEA, (byte)0x8B, (byte)0x0F, (byte)0xDF, (byte)0xAD,
    		(byte)0x01, (byte)0x77, (byte)0x2E, (byte)0x01, 
    		(byte)0x22, (byte)0x1C, (byte)0x3A, (byte)0x9A ,
    		(byte)00, (byte)10 
  	};
    
  	public final byte[] QQ_LOGIN_FIX_BETWEEN_KEY1_KEY2=new byte[]{
  			0x02,(byte) 0xFA,(byte) 0xB3,(byte) 0xBB,(byte) 0x8B, //固定：5字节
  			0x00,0x10 //密钥长度：16字节
  	};    
    /** QQ登录包, 第三段固定内容（近似可以认为是固定） */
    public static final byte[] QQ_LOGIN_FIX_DD_321 = new byte[] {
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    /**
     * QQ登陆包，第4段发送 80字节处固定5字节
     */
    public final byte[] QQ_LOGIN_FIX_E5_80= new byte[]{
    		0x01,0x0E,0x00, 0x01,0x01
    };
    
    /**
     * QQ登陆包，第4段末尾处固定7字节
     */
    public final byte[] QQ_LOGIN_FIX_E5_tail= new byte[]{
    		0x00 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00
    };
    
    /**
     *  QQ登陆包，第5段E3 25 字节处固定4字节
     *
     */public final byte[] QQ_LOGIN_FIX_E3_25= new byte[]{
    		 0x00 ,(byte) 0xC8 ,0x00 ,0x01
     };
     
     
     /**
      *  QQ登陆包，第5段E3 尾巴
      *
      */public final byte[] QQ_LOGIN_FIX_E3_TAIL= new byte[]{
    		  0x00,0x00 ,0x00, 0x20 ,
    		  0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		 ,0x00 ,0x00,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00

      };
      /**
       * 67 87 C3 8F 95 EB 89 69 32 12 15 0A 94 AD 14 C6
       */
      public final byte[] QQ_LOGIN_FIX_30_1=new byte[]{
    		  0x67,(byte) 0x87,(byte) 0xC3 ,(byte) 0x8F ,(byte) 0x95 ,(byte) 0xEB ,(byte)0x89 ,0x69 ,0x32 ,0x12 ,0x15 ,0x0A ,(byte) 0x94 ,(byte)0xAD ,0x14 ,(byte)0xC6
      };
      /**
       * 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00
	   * 00 00 00 00 00 00 00 00 00
	   *
       */
      public final byte[] QQ_LOGIN_FIX_30_2=new byte[]{
    		  0x00,0x00, 0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
      };
      
      /**
       * 16 字节填充
       */
      public final byte[] QQ_LOGIN_FIX_30_3=new byte[]{
    		  0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
      };
      
      /**
       * 00 00 00 08 00 00 00 00 08 04 10 00 01 40 01 22
	   *1C 3A 9A 00 10 7B DB D3 21 A6 E4 85 40 14 35 1F
	   *EA 5C 73 F0 54
       */
      
      public final byte[] QQ_LOGIN_FIX_30_4=new byte[]{
    		  0x00 ,0x00 ,0x00 ,0x08 ,0x00 ,0x00 ,0x00 ,0x00 ,0x08 ,0x04 ,0x10 ,0x00 ,0x01 ,0x40 ,0x01 ,0x22
    		  ,0x1C ,0x3A ,(byte) 0x9A ,0x00 ,0x10 ,0x7B ,(byte) 0xDB ,(byte)0xD3 ,0x21 ,(byte)0xA6 ,(byte) 0xE4 ,(byte) 0x85 ,0x40 ,0x14 ,0x35 ,0x1F
    		  ,(byte)0xEA ,0x5C ,0x73 ,(byte)0xF0 ,0x54

      };
      
      /**
       * 00 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00
	   * 00 00 00 00 00 00 00 00 00
       */
      public final byte[] QQ_LOGIN_FIX_30_5=new byte[]{
    		  0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x00 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
      };
      
      /**
       * 末尾填充
       */
      public final byte[] QQ_LOGIN_FIX_30_6=new byte[]{
    		  0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
    		  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
 
      };
      
      /**
       * 登陆之后包头12字节处11字节固定内容
       * 0x02,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x64,0x58
       */
      public final byte[] QQ_CONTEX_FIX_12=new byte[]{
    		  0x02,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x64,0x58
      };
    
      /**
       * 012c填充   01 01 00 10
       */
      public final byte[] QQ_CONTEX_FIX_012C_1=new byte[]{
    		  0x01 ,0x01 ,0x00 ,0x10
      };
      /**
       * 012c填充   01 01 00 10
       */
      public final byte[] QQ_CONTEX_FIX_012C_2=new byte[]{
    		  0x01 ,0x01 ,0x00 ,0x10
      };
      
      /**
       * BA图片包是否接受完毕
       */
      public final int QQ_LOGIN_BA_IMGEND_FLAG=0;
      /**
       * BA图片等待输入
       */
      public final int QQ_LOGIN_BA_IMG_WAIT_IN=0;
      /**
       * BA图片请求更改图片
       */
      public final int QQ_LOGIN_BA_IMG_CHANGE=1;
      /**
       * BA图片输入完毕
       */
      public final int QQ_LOGIN_BA_IMG_IN_DONE=2;
      /**
       * BA图片验证错误
       */
      public final int QQ_LOGIN_BA_IMG_CHECK_ERR=3;
      /**
       * BA图片验证成功
       */
      public final int QQ_LOGIN_BA_IMG_CHECK_SUCCESS=4;
}